package com.mkait.thief.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import lombok.Data;

/**
 * 
 * @TableName order_api
 */
@TableName(value ="order_api")
@Data
public class OrderApi implements Serializable {
    /**
     * 
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 
     */
    @TableField(value = "user_id")
    private Integer userId;

    /**
     * 
     */
    @TableField(value = "trade_no")
    private String tradeNo;

    /**
     * 
     */
    @TableField(value = "transaction_id")
    private String transactionId;

    /**
     * 
     */
    @TableField(value = "goods_name")
    private String goodsName;

    /**
     * 
     */
    @TableField(value = "paytype")
    private Integer paytype;

    /**
     * 
     */
    @TableField(value = "channel_id")
    private Integer channelId;

    /**
     * 
     */
    @TableField(value = "channel_account_id")
    private Integer channelAccountId;

    /**
     * 1已支付  2取消  3退款
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 
     */
    @TableField(value = "create_at")
    private Integer createAt;

    /**
     * 
     */
    @TableField(value = "success_at")
    private Integer successAt;

    /**
     * 
     */
    @TableField(value = "total_price")
    private BigDecimal totalPrice;

    /**
     * 手续费率
     */
    @TableField(value = "rate")
    private BigDecimal rate;

    /**
     * 
     */
    @TableField(value = "fee")
    private BigDecimal fee;

    /**
     * 
     */
    @TableField(value = "finally_money")
    private BigDecimal finallyMoney;

    /**
     * 
     */
    @TableField(value = "out_trade_no")
    private String outTradeNo;

    /**
     * 
     */
    @TableField(value = "notify_url")
    private String notifyUrl;

    /**
     * 
     */
    @TableField(value = "return_url")
    private String returnUrl;

    /**
     * 回调次数
     */
    @TableField(value = "repost_count")
    private Integer repostCount;

    /**
     * 
     */
    @TableField(value = "type_name")
    private String typeName;

    /**
     * 
     */
    @TableField(value = "notify_status")
    private Integer notifyStatus;

    /**
     * 
     */
    @TableField(value = "last_reissue_time")
    private Integer lastReissueTime;

    /**
     * 结算方式，1:T1结算，0:T0结算
     */
    @TableField(value = "settlement_type")
    private Integer settlementType;

    /**
     * 
     */
    @TableField(value = "sitename")
    private String sitename;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        OrderApi other = (OrderApi) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getTradeNo() == null ? other.getTradeNo() == null : this.getTradeNo().equals(other.getTradeNo()))
            && (this.getTransactionId() == null ? other.getTransactionId() == null : this.getTransactionId().equals(other.getTransactionId()))
            && (this.getGoodsName() == null ? other.getGoodsName() == null : this.getGoodsName().equals(other.getGoodsName()))
            && (this.getPaytype() == null ? other.getPaytype() == null : this.getPaytype().equals(other.getPaytype()))
            && (this.getChannelId() == null ? other.getChannelId() == null : this.getChannelId().equals(other.getChannelId()))
            && (this.getChannelAccountId() == null ? other.getChannelAccountId() == null : this.getChannelAccountId().equals(other.getChannelAccountId()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getCreateAt() == null ? other.getCreateAt() == null : this.getCreateAt().equals(other.getCreateAt()))
            && (this.getSuccessAt() == null ? other.getSuccessAt() == null : this.getSuccessAt().equals(other.getSuccessAt()))
            && (this.getTotalPrice() == null ? other.getTotalPrice() == null : this.getTotalPrice().equals(other.getTotalPrice()))
            && (this.getRate() == null ? other.getRate() == null : this.getRate().equals(other.getRate()))
            && (this.getFee() == null ? other.getFee() == null : this.getFee().equals(other.getFee()))
            && (this.getFinallyMoney() == null ? other.getFinallyMoney() == null : this.getFinallyMoney().equals(other.getFinallyMoney()))
            && (this.getOutTradeNo() == null ? other.getOutTradeNo() == null : this.getOutTradeNo().equals(other.getOutTradeNo()))
            && (this.getNotifyUrl() == null ? other.getNotifyUrl() == null : this.getNotifyUrl().equals(other.getNotifyUrl()))
            && (this.getReturnUrl() == null ? other.getReturnUrl() == null : this.getReturnUrl().equals(other.getReturnUrl()))
            && (this.getRepostCount() == null ? other.getRepostCount() == null : this.getRepostCount().equals(other.getRepostCount()))
            && (this.getTypeName() == null ? other.getTypeName() == null : this.getTypeName().equals(other.getTypeName()))
            && (this.getNotifyStatus() == null ? other.getNotifyStatus() == null : this.getNotifyStatus().equals(other.getNotifyStatus()))
            && (this.getLastReissueTime() == null ? other.getLastReissueTime() == null : this.getLastReissueTime().equals(other.getLastReissueTime()))
            && (this.getSettlementType() == null ? other.getSettlementType() == null : this.getSettlementType().equals(other.getSettlementType()))
            && (this.getSitename() == null ? other.getSitename() == null : this.getSitename().equals(other.getSitename()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getTradeNo() == null) ? 0 : getTradeNo().hashCode());
        result = prime * result + ((getTransactionId() == null) ? 0 : getTransactionId().hashCode());
        result = prime * result + ((getGoodsName() == null) ? 0 : getGoodsName().hashCode());
        result = prime * result + ((getPaytype() == null) ? 0 : getPaytype().hashCode());
        result = prime * result + ((getChannelId() == null) ? 0 : getChannelId().hashCode());
        result = prime * result + ((getChannelAccountId() == null) ? 0 : getChannelAccountId().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getCreateAt() == null) ? 0 : getCreateAt().hashCode());
        result = prime * result + ((getSuccessAt() == null) ? 0 : getSuccessAt().hashCode());
        result = prime * result + ((getTotalPrice() == null) ? 0 : getTotalPrice().hashCode());
        result = prime * result + ((getRate() == null) ? 0 : getRate().hashCode());
        result = prime * result + ((getFee() == null) ? 0 : getFee().hashCode());
        result = prime * result + ((getFinallyMoney() == null) ? 0 : getFinallyMoney().hashCode());
        result = prime * result + ((getOutTradeNo() == null) ? 0 : getOutTradeNo().hashCode());
        result = prime * result + ((getNotifyUrl() == null) ? 0 : getNotifyUrl().hashCode());
        result = prime * result + ((getReturnUrl() == null) ? 0 : getReturnUrl().hashCode());
        result = prime * result + ((getRepostCount() == null) ? 0 : getRepostCount().hashCode());
        result = prime * result + ((getTypeName() == null) ? 0 : getTypeName().hashCode());
        result = prime * result + ((getNotifyStatus() == null) ? 0 : getNotifyStatus().hashCode());
        result = prime * result + ((getLastReissueTime() == null) ? 0 : getLastReissueTime().hashCode());
        result = prime * result + ((getSettlementType() == null) ? 0 : getSettlementType().hashCode());
        result = prime * result + ((getSitename() == null) ? 0 : getSitename().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userId=").append(userId);
        sb.append(", tradeNo=").append(tradeNo);
        sb.append(", transactionId=").append(transactionId);
        sb.append(", goodsName=").append(goodsName);
        sb.append(", paytype=").append(paytype);
        sb.append(", channelId=").append(channelId);
        sb.append(", channelAccountId=").append(channelAccountId);
        sb.append(", status=").append(status);
        sb.append(", createAt=").append(createAt);
        sb.append(", successAt=").append(successAt);
        sb.append(", totalPrice=").append(totalPrice);
        sb.append(", rate=").append(rate);
        sb.append(", fee=").append(fee);
        sb.append(", finallyMoney=").append(finallyMoney);
        sb.append(", outTradeNo=").append(outTradeNo);
        sb.append(", notifyUrl=").append(notifyUrl);
        sb.append(", returnUrl=").append(returnUrl);
        sb.append(", repostCount=").append(repostCount);
        sb.append(", typeName=").append(typeName);
        sb.append(", notifyStatus=").append(notifyStatus);
        sb.append(", lastReissueTime=").append(lastReissueTime);
        sb.append(", settlementType=").append(settlementType);
        sb.append(", sitename=").append(sitename);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}